﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Web.Controls
{
    public class PagingOptionsComparer : ComparerBase<OptionBase>
    {
        internal override bool CheckDuplicates(Type type)
        {
            return (
                       type.Equals(typeof(PageLength)) ||
                       type.Equals(typeof(PagingType))
                    );
        }

        internal override bool AllowedTypes(Type type)
        {
            bool retValue = false;

            Type[] m_types = new Type[] { typeof(PageLength), typeof(PagingType) };

            if (m_types.Contains(type)) retValue = true;

            return retValue;
        }
    }
}
